<template>
  <div :class="['section', 'user_ranklist']">
    <ranklist title="囍宴排行榜"
              :user="userInfo ? userInfo.id : ''">
    </ranklist>
    <home></home>
  </div>
</template>

<script>
  import ranklist from '@/components/ranklist';
  import home from '@/components/home';

  export default {
    name: 'myRanklist',
    data: function () {
      return {
        getUserInfoPath: 'static/data/my_info.json',
        userInfo: null
      }
    },
    components: {
      ranklist,
      home
    },
    created: function () {
      axios.get(this.getUserInfoPath).then((res) => {
        this.$set(this, 'userInfo', res.data.myInfo);
      }).catch((error) => {
        console.log(error);
      });
    }
  }
</script>

<style lang="scss">
</style>

<style lang="scss" scoped>
</style>
